

SRC = $(wildcard *.cpp)
HEADER = $(wildcard *.h)

#OPT = -DDEBUG
LDFLAGS = `mylibs-config --ldflags`
CFLAGS  =  -Wall -pedantic `mylibs-config --cflags` -fopenmp

CC = colorgcc


ARCH = $(shell uname -m)
LAST_BUILD = $(shell cat make.log)

pacing: gen_pacing_electrodes.cpp
	$(CC) gen_pacing_electrodes.cpp -o gen_pacing_electrodes.$(ARCH) $(CFLAGS) $(LDFLAGS) $(OPT)
	cd $(MYLOCAL)/bin && ln -sf  $(PWD)/gen_pacing_electrodes.$(ARCH) gen_pacing_electrodes.$(ARCH)
	mkdir -p  ~/.bash_completion.d
	gen_pacing_electrodes.$(ARCH) --bash_completion && cp  gen_pacing_electrodes.$(ARCH).bash_completion ~/.bash_completion.d/
	echo `arch` > make.log

doc: $(SRC)
	doxygen
	firefox doc/index.htm&

clean:
	rm -rf *.o pacing_electrodes.$(ARCH)
